import { required } from '@/utils'
export function useOptions() {
  const control = ref<FormInterface[]>([
    {
      type: 'input',
      label: '订单号',
      field: 'orderNo',
      width: '400px',
      col: 12,
      // rules: [{ required: true, message: '请输入订单号', trigger: ['blur', 'change'] }],
      rules: [required({ message: '订单号' })],
    },
    {
      type: 'select',
      label: '订单状态',
      field: 'orderState',
      multiple: true,
      options: [
        { label: 'vue', value: 111, disabled: true },
        { label: 'js', value: 222 },
      ],
      col: 12,
      rules: [required({ type: 'change' })],
    },
    {
      type: 'textarea',
      label: '订单描述',
      field: 'orderDec',
      maxlength: '500',
      count: true,
    },
    {
      type: 'radio',
      label: '单选',
      field: 'abc',
      options: [
        { label: 'vue', value: 111, disabled: true },
        { label: 'js', value: 222 },
      ],
    },
  ])

  return {
    control,
  }
}
